/**
 * @author Troy Gardner
 */
class com.troyworks.util.codeGen.StateMachineHelper {
		public static function scanFunctions(hsmf:Object):Void{
		trace("HSMF.parseStateMachineModel" + hsmf);
		for (var i in hsmf) {
			var o:Object = hsmf[i];
			trace(" scanning " + i + " " +hsmf[i]);
			if (o instanceof Function && i.indexOf("s_")>-1) {
				trace(i+" is a state func ");
				o.fname = String(i);
				switch(i){
					case "s_top":
					o.stype = -1;
					break;
					case "s_initial":
					o.stype = 0;
					break;
					case "s_final":
					o.stype = 0;
					break;
					default:
					o.stype = 1;
					break;
				}
			}
		}
	}
	public function getStateNamesOLD(from : Function, to : Function, top : Function) : Array{
		var a : String = from.fname;
		var b : String = to.fname;
		if(top == null){
			return [a, b];
		}else {
			var c : String = top.fname;
			return [a, b, c];
		}
	}
	/*	public function getCurrentStateNamesOLD(showTop:Boolean):String{
		myStateName = myState.fname;
		mySourceStateName =mySource.fname;
		//show the top
		if(showTop == null || showTop == false){
			return __cname + ":  +   source:" + mySourceStateName + "  myState:" +myStateName;
		}else {

			myTopStateName  = s_top.fname;
			return __cname + ":  +   source:" + mySourceStateName + "  myState:" +myStateName+ "  top:" + myTopStateName;
		}
 
	}*/
	
}